<div class="top-box">
    <a href="{:url('index')}" class="tb-logo">
        <img src="__STATIC__/index/images/icon_logo.png"/>
    </a>
    <div class="tp-xx">
        <div class="tpx-img">
            <img src="{$Think.session.login_info.avatar}"/>
        </div>
        <div class="tpx-sj">{$Think.session.login_info.mobile}</div>
        <div class="divclear"></div>
    </div>
    <div class="tb-nav">
        <a class="tbn-btn {:Request()->action(true) == 'index' ? 'cur' : ''}" href="{:url('index')}">平台首页</a>
        <a class="tbn-btn {:in_array(Request()->action(true), ['studyLogList', 'integralLogList', 'errorTopicList', 'weChatList']) ? 'cur' : ''}" href="{:url('studyLogList')}">学习中心</a>
        <a class="tbn-btn {:in_array(Request()->action(true), ['setInfo', 'editPassword']) ? 'cur' : ''}" href="{:url('setInfo')}">个人中心</a>
        <div class="tbn-btn" onclick="loginOut()">退出登录</div>
        <div class="divclear"></div>
    </div>
    <div class="divclear"></div>
</div>

<script>
    function loginOut(){
        $.post(`{:url('loginOut')}`, () => {
            layer.msg('退出登录成功');
            setTimeout(function (){
                window.location.href = `{:url('login')}`
            },500)
        })
    }
</script>